import userEvent from '@testing-library/user-event'
import React,{useEffect,useState} from 'react'

export default function index() {
  const [color, setColor] = useState([])
  useEffect(()=>{
    setColor(
      ['#ace0ff', '#bcffbd', '#e4fabd', '#ffcfac']
    )
  },[])
  return (
    <div>
      {
        colors.map((color, index) => (
          <Swiper.Item key={index}>
            <div
              className={styles.content}
              style={{ background: color }}
              onClick={() => {
                Toast.show(`你点击了卡片 ${index + 1}`)
              }}
            >
              {index + 1}
            </div>
          </Swiper.Item>
        ))
      }
    </div>
  )
}
